﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Input;
using SarkoCut.ViewModel;

namespace SarkoCut.Commands
{
    public class CutCommand : ICommand
    {
        private MainWindowViewModel _vm;

        public CutCommand(MainWindowViewModel vm)
        {
            _vm = vm;
        }

        public bool CanExecute(object parameter)
        {
            if (_vm.IsCueLoaded && !string.IsNullOrEmpty(_vm.Path) && _vm.FilenameView.CurrentPosition > 0)
                return true;

            return false;
        }

        public event EventHandler CanExecuteChanged
        {
            add { CommandManager.RequerySuggested += value; }
            remove { CommandManager.RequerySuggested -= value; }
        }

        public void Execute(object parameter)
        {
            throw new NotImplementedException();
        }
    }
}
